package com.itheima.day03;

import org.junit.Test;

enum Sex {
    MAN,WOMAN("女");

    private String s;
    Sex() {
    }
    Sex(String s) {
        this.s = s;
    }

    String getinfo() {
        return s;
    }
}

public class TestEnum {
    @Test
    public void testEnum() {
        System.out.println(Sex.WOMAN.getinfo());
        test1(Sex.WOMAN);
    }

    public void test1(Sex sex) {
        switch (sex) {
            case MAN -> {
                System.out.println("修仙小说");
                break;
            }
            case WOMAN -> {
                System.out.println("女生小说");
                break;
            }
            default-> System.out.println("wu");
        }
    }
}
